<?php
namespace app\models\user;

use app\admin\model\BaseModel;
use app\admin\model\ModelTrait;


class UserDefinite extends BaseModel
{
    /**
     * 数据表主键
     * @var string
     */
    protected $pk = 'id';
    use ModelTrait;

    //列表
    public static function pageList($where,$uid)
    {
        $model = new self;
        $model = $model->where("uid",$uid);
        $model = $model->where("type",$where['type']);
        //条件
        if($where['pm'] != "") $model = $model->where("pm",$where['pm']);

        $model = $model->page((int)$where['page'],(int)$where['limit']);

        $data = $model->select();
        return $data ? $data->toArray() : [];
    }
}
